using System;
using System.Collections;
using System.Text;
using RandomGenerationFramework;

namespace RDGen
{
    public  class RandomGenerator
    {

        private static Hashtable characterset = new Hashtable();
        private Random CharacterAtRandom = new Random();
        private static Hashtable MonthSet = new Hashtable();
        
        public RandomGenerator()
        {
            if (!(characterset.Count > 0))
            {

                characterset.Add("1", "A");
                characterset.Add("2", "B");
                characterset.Add("3", "C");
                characterset.Add("4", "D");
                characterset.Add("5", "E");
                characterset.Add("6", "F");
                characterset.Add("7", "G");
                characterset.Add("8", "H");
                characterset.Add("9", "I");
                characterset.Add("10", "J");
                characterset.Add("11", "K");
                characterset.Add("12", "L");
                characterset.Add("13", "M");
                characterset.Add("14", "N");
                characterset.Add("15", "O");
                characterset.Add("16", "P");
                characterset.Add("17", "Q");
                characterset.Add("18", "R");
                characterset.Add("19", "S");
                characterset.Add("20", "T");
                characterset.Add("21", "U");
                characterset.Add("22", "V");
                characterset.Add("23", "W");
                characterset.Add("24", "X");
                characterset.Add("25", "Y");
                characterset.Add("26", "Z");
                characterset.Add("27", "a");
                characterset.Add("28", "b");
                characterset.Add("29", "c");
                characterset.Add("30", "d");
                characterset.Add("31", "e");
                characterset.Add("32", "f");
                characterset.Add("33", "g");
                characterset.Add("34", "h");
                characterset.Add("35", "i");
                characterset.Add("36", "j");
                characterset.Add("37", "k");
                characterset.Add("38", "l");
                characterset.Add("39", "m");
                characterset.Add("40", "n");
                characterset.Add("41", "o");
                characterset.Add("42", "p");
                characterset.Add("43", "q");
                characterset.Add("44", "r");
                characterset.Add("45", "s");
                characterset.Add("46", "t");
                characterset.Add("47", "u");
                characterset.Add("48", "v");
                characterset.Add("49", "w");
                characterset.Add("50", "x");
                characterset.Add("51", "y");
                characterset.Add("52", "z");

                MonthSet.Add("1", "JAN");
                MonthSet.Add("2", "FEB");
                MonthSet.Add("3", "MAR");
                MonthSet.Add("4", "APR");
                MonthSet.Add("5", "MAY");
                MonthSet.Add("6", "JUN");
                MonthSet.Add("7", "JUL");
                MonthSet.Add("8", "AUG");
                MonthSet.Add("9", "SEP");
                MonthSet.Add("10", "OCT");
                MonthSet.Add("11", "NOV");
                MonthSet.Add("12", "DEC");
                

            }
        }

        public string GetDay()
        {
                     
            return CharacterAtRandom.Next(1, 28).ToString();
        }

        public string GetMonth()
        {
       
            return MonthSet[CharacterAtRandom.Next(1, 12).ToString()].ToString();

        }

        public string GetYear()
        {
            return System.DateTime.Now.Year.ToString();            
        }

        public string GetChar()
        {
            IntegerRandomGenerator ig = new IntegerRandomGenerator(1, 52);
            return characterset[ig.GetRandom().ToString()].ToString();
 
        }

       
        public string GetInt()
        {
            //Random intRandom = new Random();
            //return intRandom.Next(1, 9).ToString();
            IntegerRandomGenerator ig = new IntegerRandomGenerator(1, 9);
            return ig.GetRandom().ToString();
        }

        public string GetTinyInt()
        {
            IntegerRandomGenerator ig = new IntegerRandomGenerator(1, 255);
            return ig.GetRandom().ToString();
        }
    }
}
